<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>会议室订单</title>

<link href="./css/style.css" rel="stylesheet" type="text/css" />
<link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="./js/jquery.js"></script>
<script type="text/javascript" src="./js/bootstrap.min.js"></script>
<script type="text/javascript" src="./js/jquery.idTabs.min.js"></script>
<script type="text/javascript" src="./js/application/memberindex.js"></script>
<script type="text/javascript" src="./js/application/memberMeetingroomOrderList.js?20180824"></script>
<script type="text/javascript" src="./js/jquery.form.js"></script>
<script type="text/javascript" src="./laydate/laydate5.js"></script>
<style>
.cancelBtn{background: #fff;color: #000;border: 1px solid #000;}
.leftMenuTitle{background:url("./images/lefttop.gif") no-repeat;background-size: 4px 22px;background-position: 1px 7px;padding-left: 12px;}
.leftMenuTitle span{border-bottom:0px;}
</style>
</head>
<body>
<div class="incList">	
    <div class="formbody" name="meetingRoomList">
    	<div class="leftMenuTitle formtitle"><span id="infoTitle">会议室订单</span></div>
        <div class="tools">
            <ul class="seachform">   
                <li>
                    <label>会议名称:</label>
                    <input type="text" name="rtitle" class="tlinput"  id="searchMeetingRoomName"/>
                </li>
				
				<li>
					<label>会议状态</label>
					<div class="vocation">
                        <select class="tlselect" name="statusSelect" id="searchStatus">
                            <option value="-1" selected>全部</option>
                            <option value="1">未开始</option>
                            <option value="3">进行中</option>
                            <option value="2">已结束</option>
                        </select>
					</div>
                </li>
				<li>
					<label>订单状态</label>
					<div class="vocation">
                        <select class="tlselect" name="orderStatusSelect" id="searchOrderStatus">
                            <option value="-1" selected>全部</option>
                            <option value="1">仅预订</option>
                            <option value="2">已支付</option>
                            <option value="0">已退订</option>
                        </select>
					</div>
                </li></ul>
                 <ul class="seachform">   
                <li>
                    <label>预约人</label>
                    <input type="text" name="autitle" class="tlinput"  id="searchApplyUserName"/>
                </li>

                <li>
                	<label>会议时间筛选:</label>
                    <input name="beginTime" id="searchBeginTime" message='请选择开始时间' formParameter="clue" placeholder="请选择开始时间" 
                    	type="text" name="" class="indinput"/>                        
                </li>
				<li>
                	<label>至</label>
                    <input name="endTime" id="searchEndTime" message='请选择结束时间' formParameter="clue" placeholder="请选择结束时间" 
                    	type="text" name="" class="indinput"/>                        
                </li>
                 <li style="float:right"><label>&nbsp;</label><input name="btnSerch" onclick="searchReset();" type="button" class="cancelBtn scbtn" value="清空"/></li>
                <li style="float:right"><label>&nbsp;</label><input name="btnSerch" onclick="search();" type="button" class="scbtn" value="搜索"/></li>

            </ul>
        </div>
        <div id="usual1" class="usual">     
            <div id="tab2" class="tabson">    
                <table class="tablelist">
                    <thead>
                        <tr>
                        	<th>序号</th>
                            <th>会议状态</th>
                            <th>预约人</th>
                            <th>会议主题</th>
                            <th>会议时间</th>
                            <th>空间</th>
                            <th>会议室名称</th>
                            <th>订单状态</th>
                            <th>费用</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody id="userTable"></tbody>
                </table>
                <div class="pagin">
                    <div class="message">共<i id="totalRow" class="blue">0</i>条记录，每页<i id="pageSize" class="blue">0&nbsp;</i>条记录，当前显示第&nbsp;<i id="currentPage" class="blue">1&nbsp;</i>页</div>
                    <ul class="paginList" ></ul>
                </div>
            </div>
        </div>   
    </div>
     <style>
     ul#ViewInfo li{display: table-cell;width:350px;}
     ul#ViewInfo li:nth-child(2){margin-left:50px;}
    ul#ViewInfo li, ul#ViewInfo li label{margin-top:-5px;font-size:16px;}</style>
		<div class="formbody" name="viewInfo" style="display: none">
		<div class="leftMenuTitle formtitle"><span id="infoTitle">会议详情</span></div>
		    <div class="formtitle"><span>基本信息</span></div>
		    <table class="table" style="width:700px;">
			    <tbody id="ViewInfo1"></tbody>
			</table>
		    <div class="formtitle"><span>会议室订单详情</span></div>
		     <table class="table" style="width:700px;">
			    <tbody id="ViewInfo2"></tbody>
			</table>
			<div class="formtitle"><span>会议室详情</span></div>
		     <table class="table" style="width:700px;">
			    <tbody id="ViewInfo3"></tbody>
			</table>
			<div class="formtitle"><span>会议室费用</span></div>
		     <table class="table" style="width:700px;">
			    <tbody id="ViewInfo4"></tbody>
			</table>
		     <div id="btnViewCancle"  class="btn" >返回</div> <div id="btnViewsave" style="display:none" class="btn" >取消预订</div>
		    </div>
	    </div>
    
</div>
<script>
$(function(){
	$("#btnViewCancle").click(function(){
		$("DIV[name='meetingRoomList']").show();
		$("DIV[name='viewInfo']").hide();	
	})
	
	$("#btnViewsave").click(function(){
		var memberToken = localStorage.getItem('memberToken');
		var orderid=$("#btnViewsave").attr('data-id');
		var requestJson = {'order_id':orderid,'status':0};
		if(requestJson == false){
			return false;
		}
		$.ajax({
	        url: '/euc/_meetingroom/updateMeetingOrderStatus',
	        data:requestJson,
	       // data:'{"data":{"status":-1,"startTime":"2017-12-31","endTime":"2018-12-31","spaceId":0},"currentPage":1}',
	        beforeSend: function(request) {
	            request.setRequestHeader("token",memberToken );
	        },
	        
	        dataType: 'JSON',
	        async: true,
	        contentType:'application/x-www-form-urlencoded',
	        type: 'POST',
	        success: function (result, textStatus, response) {
	        	if(result.status==0&& result.message=='success'){
	        		alert('取消成功');
	        		window.location.reload();
	        	}else{
	        		alert(result.message);
	        	}
       	
	        },
	        error: function () {
	        	console.log("error");
	        }  
	    });
	})

	laydate.render({
		  elem: '#searchBeginTime',
		  type:'date',
		  value: new Date()
		  
		});
	laydate.render({
		  elem: '#searchEndTime',
		  type:'date',
		  value: new Date()
		});
})
</script>	
</script>	
</body>
</html>